﻿using System.Runtime.Serialization;
using OnDash.Windowing.GraphicsLibraryFramework.Enums;

namespace OnDash.Windowing.GraphicsLibraryFramework;

public class GlfwException : Exception
{
    public GlfwException()
    {
    }

    public GlfwException(string message)
        : base(message)
    {
    }

    public GlfwException(string message, ErrorCode errorCode)
        : base(message)
    {
        ErrorCode = errorCode;
    }

    public GlfwException(string message, Exception innerException)
        : base(message, innerException)
    {
    }

    [Obsolete("Obsolete")]
    protected GlfwException(SerializationInfo info, StreamingContext context)
        : base(info, context)
    {
    }

    public ErrorCode ErrorCode { get; }
}